package com.ourchem.bus.feign;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.ourchem.bus.conf.NacosDataFeignConfig;
import com.ourchem.bus.dto.*;
import com.ourchem.data.api.query.ExpiredYearAnalyReqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "nacos-thematic", url = "${datacenter.thematic-url:}",configuration = NacosDataFeignConfig.class)
public interface ThemacitFeignService {

	@RequestMapping(value = "/thematicDatabase/createComItem",method = RequestMethod.POST)
	public String createComItem(@RequestBody(required = true) JsonNode jsonNode);

	@RequestMapping(value = "/thematicDatabase/deleteComItem",method = RequestMethod.GET)
	public String deleteComItem(@RequestParam(value = "name") String name);

	@RequestMapping(value = "/thematicDatabase/deleteComItems",method = RequestMethod.GET)
	public String deleteComItems(@RequestParam(value = "names") String names);

	@RequestMapping(value = "/thematicDatabase/getCompetitorDatabaseCount",method = RequestMethod.GET)
	public String getCompetitorDatabaseCount(@RequestParam(value = "title") String  title);

	@RequestMapping(value = "/search/family",method = RequestMethod.POST)
	public String searchFamily(@RequestBody SearchReqDTO queryParamDTO);

	@RequestMapping(value = "/thematicDatabase/resort",method = RequestMethod.POST)
	public String resort(@RequestBody(required = true) ArrayNode arrayNode);



	@RequestMapping(value = "/search/search",method = RequestMethod.POST)
	public String competitorDatabaseSearch(@RequestBody(required = true) QueryParamDTO queryParamDTO);


	/**
	 * 分析中的合作分析接口
	 */
	@RequestMapping(value = "/search/analyze",method = RequestMethod.POST)
	public String analysisTranslationSearch(@RequestBody ConnectAnalysisReqDTO connectAnalysisReqDTO);


	/**
	 * 分析中的合作分析接口
	 */

	@RequestMapping(value = "/search/extract/word",method = RequestMethod.POST)
	public String extractWord(@RequestBody ExtractWordReqDTO extractWordReqDTO);


	/**
	 * 单维度字段数据量排行分析
	 */
	@RequestMapping(value = "/search/analy/single/field/rank",method = RequestMethod.POST)
	public String singleFieldRankAnaly(@RequestBody SingleFieldRankAnalyReqDTO singleFieldRankAnalyReqDTO) ;

	/**
	 * 多维度总排名分析
	 */
	@PostMapping("/analy/multi/field/rank")
	@RequestMapping(value = "/search/analy/multi/field/rank",method = RequestMethod.POST)
	public String multiFieldTopRankAnaly(@RequestBody MultiFieldTopRankAnalyReqDTO multiFieldTopRankAnalyReqDTO);
	/**
	 * 失效年趋势统计
	 */

	@RequestMapping(value = "/search/analy/expired/year",method = RequestMethod.POST)
	public String expiredYearAnaly(@RequestBody ExpiredYearAnalyReqVO expiredYearAnalyReqVO);
}
